#ifndef __TOUCH_LAYER_H__
#define __TOUCH_LAYER_H__
#include "cocos2d.h"

class GameScene;
class TouchLayer : public cocos2d::CCLayer
{
public:
	TouchLayer();
	virtual ~TouchLayer();
	bool init();
	CREATE_FUNC(TouchLayer);
	void setTouchEnabled(bool flag);
	virtual bool ccTouchBegan(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent);
	virtual void ccTouchMoved(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent);
	virtual void ccTouchEnded(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent);
private:
	GameScene* getGameScene();
	cocos2d::CCPoint locationFromTouch(cocos2d::CCTouch* touch);
};

#endif